import React, { Component } from 'react';
// import Banner from '../../components/Banner';

import { Tabs } from 'antd';
import store from '../../store';
import FilmList from '../../components/FilmList';

const { TabPane } = Tabs;

function callback(key) {
  console.log(key);
}
const styles = {paddingBottom:"70px"}

const Homehoc = Cmp => props =>{

        return (
            <>
                {/* <Banner/> */}
                <Tabs className='daohang' style={styles} defaultActiveKey="1" onChange={callback}>
                    <TabPane className='zhengzhai' tab="正在热播" key="1">
                    {store.getState().hotArr.map(item=>{
                        return <FilmList key={item.filmId} {...props} {...item}></FilmList>
                    })}
                    </TabPane>
                    <TabPane className='zhengzhai' tab="即将上映" key="2">
                    {store.getState().soonArr.map(item=>{
                        return <FilmList key={item.filmId} {...props} {...item}></FilmList>
                    })}
                    </TabPane>
                </Tabs>
                <Cmp {...props}/>
            </>
        );
    }

export default Homehoc;
